/****** Object:  Stored Procedure [dbo].spproductGetList Script Date: 11/24/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spproductSearch]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spproductSearch]
GO

CREATE PROCEDURE [dbo].[spproductSearch]
(
	@ProductName nvarchar(50)
)
WITH ENCRYPTION
AS

SELECT
	*
FROM
	[tbl_product]
Where 
	@ProductName is null OR [ProductName] like N'%'+@ProductName+'%'
GO

--GRANT EXECUTE ON [dbo].[spproductGetList] TO [sa]
--GO
